Include files used with scripts can be handled in one of two ways during the encryption process. Include files may left as unencrypted source code external to the script by appending a
.vss extension to the file name. When the script which references the include file is encrypted, the link to the file will be preserved, and the script will use the code from the include file when executed. Scripts encrypted using this method still require the presence of the include file in order to execute correctly.
Alternatively, include files can be encrypted along with the script which calls them by appending a .px extension to the name of the include file. In this case, the contents of the include file are copied into the calling script and then the entire body of source code is encrypted. The source code of the include file remains untouched by the encryption process. Scripts encrypted in this manner do not require the presence of external include files to execute correctly, as they contain all the needed code within the encrypted script.
If the script above were encrypted, the subroutine Remote_Sub would remain in the include file. It would be called as needed by the
EncryptExample1 script, and the include file would also need to be present in order for
EncryptExample1 to execute properly. If we were to change the name of the include file and modify the calling script as shown:
In this instance the code from myinclude.px would be copied into the calling script at the location of the include statement, and the entire script would then be encrypted. The encrypted script would require no additional files to execute properly, and the original code in the file
myinclude.px would be untouched.